<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 获取浏览器的相关信息（主要使用userAgent）
        console.log(navigator.appName);
        console.log(navigator.appVersion);
        console.log(navigator.userAgent);

        // setTimeout(() => {
        //     // location.href = "https://www.baidu.com";
        //     window.location = "https://www.taobao.com";
        // },2000);

        // 获取屏幕的分辨率
        console.log("屏幕分辨率",screen.width,screen.height);
        // 获取屏幕可用分辨率
        console.log("屏幕可用分辨率",screen.availWidth,screen.availHeight);

        document.write('<h1>Hello</h1>');
    </script>
</body>
</html>